package biblio.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConnectionFactory {
	
	private String url;
	private String user;
	private String password;
	
	public ConnectionFactory() throws ClassNotFoundException {
		Class.forName("oracle.jdbc.driver.OracleDriver");
		
		url = "jdbc:oracle:thin:@localhost:1521:xe";
		user = "biblio";
		password = "biblio";
	}
	
	public Connection getConnection() throws SQLException {
		return DriverManager.getConnection(url, user, password);
	}
}